/PROG  PNS0199
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "PNS0016 SPM";
PROG_SIZE	= 3331;
CREATE		= DATE 12-07-18  TIME 19:28:08;
MODIFIED	= DATE 25-04-29  TIME 18:47:20;
FILE_NAME	= ZPNS0001;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3787;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0016 ;
   7:  !  PART:  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=75    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.3    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  26:J P[2:PICK POUNCE] 50% CNT100 BREAK ACC150    ;
  27:  PAUSE ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED/SuDu] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  TIMER[3]=START ;
  53:  OVERRIDE=R[5:SPEED/SuDu] ;
  54:J P[3:PICK APPROACH] 100% CNT70 ACC150    ;
  55:   ;
  56:J P[4:PICK] 100% CNT25 TB R[18]sec,CALL PARTPICK BREAK ACC150    ;
  57:  PAYLOAD[2] ;
  58:   ;
  59:J P[5:PICK DEPART] 100% CNT100 ACC150    ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:   ;
  63:J P[6:PICK SNEAK] 100% CNT100 DB  500.0mm,DO[5:TO R34 DROP START]=PULSE,0.5sec ACC150    ;
  64:J P[7:PICK CLEAR] 100% CNT100 ACC150    ;
  65:   ;
  66:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  67:  LBL[30:GOTO DROP POUNCE] ;
  68:J P[8:DROP POUNCE] 100% CNT100 BREAK ACC150    ;
  69:   ;
  70:  TIMER[3]=STOP ;
  71:  LBL[40:AT DROP POUNCE] ;
  72:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  73:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  74:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  75:  JMP LBL[40] ;
  76:   ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  TIMER[3]=START ;
  79:  OVERRIDE=R[5:SPEED/SuDu] ;
  80:J P[9:DROP SNEAK] 100% CNT100 BREAK ACC150    ;
  81:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  84:  JMP LBL[51] ;
  85:  JMP LBL[50] ;
  86:   ;
  87:  LBL[60:MOVE CLS-PRS-ACC] ;
  88:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  89:  PAUSE ;
  90:  JMP LBL[40] ;
  91:   ;
  92:  LBL[80:DROP ENABLED] ;
  93:  TIMER[3]=START ;
  94:  !PROCEED TO DROP ;
  95:  OVERRIDE=R[5:SPEED/SuDu] ;
  96:J P[10:DROP APPROACH] 100% CNT50 ACC150    ;
  97:   ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT30 TB R[19]sec,CALL PARTDROP BREAK ACC150    ;
 100:  DO[6:PART DROP COMPLETE]=PULSE,1.5sec ;
 101:  PAYLOAD[1] ;
 102:   ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC150    ;
 104:  CALL CHK_DROP    ;
 105:  DO[7:PRESS STAMPING START]=PULSE,0.5sec ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC150    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 BREAK ACC150    ;
 109:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100 ACC150    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1986.203  mm,	Y =    -8.098  mm,	Z = -1015.211  mm,
	W =  -179.183 deg,	P =     1.681 deg,	R =  -179.587 deg,
	E1=   104.349 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.396  mm,	Y =  1607.457  mm,	Z = -1150.118  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.802 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2641.496  mm,	Y =  3256.557  mm,	Z = -1060.131  mm,
	W =   179.796 deg,	P =     -.593 deg,	R =    90.956 deg,
	E1=   193.759 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2641.497  mm,	Y =  3256.557  mm,	Z = -1198.000  mm,
	W =   179.796 deg,	P =     -.593 deg,	R =    90.956 deg,
	E1=   193.759 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2641.497  mm,	Y =  3256.557  mm,	Z = -1040.000  mm,
	W =   179.796 deg,	P =     -.593 deg,	R =    90.956 deg,
	E1=   193.759 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2245.706  mm,	Y =  2197.844  mm,	Z = -1090.000  mm,
	W =   178.758 deg,	P =      .469 deg,	R =   128.450 deg,
	E1=   156.459 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.399  mm,	Y =  1318.044  mm,	Z = -1100.000  mm,
	W =   179.320 deg,	P =     1.371 deg,	R =   150.802 deg,
	E1=   134.033 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.561  mm,	Y = -1000.720  mm,	Z = -1110.000  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2268.000  mm,	Y = -2159.000  mm,	Z = -1100.000  mm,
	W =  -177.578 deg,	P =     -.243 deg,	R =  -129.000 deg,
	E1=    53.800 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.005  mm,	Y = -3256.820  mm,	Z = -1080.000  mm,
	W =  -179.902 deg,	P =      .695 deg,	R =   -93.104 deg,
	E1=    17.729 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.005  mm,	Y = -3256.820  mm,	Z = -1170.116  mm,
	W =  -179.902 deg,	P =      .695 deg,	R =   -93.104 deg,
	E1=    17.729 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.005  mm,	Y = -3256.820  mm,	Z = -1100.000  mm,
	W =  -179.902 deg,	P =      .695 deg,	R =   -93.104 deg,
	E1=    17.729 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2164.000  mm,	Y = -1706.000  mm,	Z = -1100.000  mm,
	W =  -178.096 deg,	P =      .200 deg,	R =  -141.000 deg,
	E1=    65.900 deg
};
/END
